package qldc.pm.tiensu.searchcontainer;

import java.text.SimpleDateFormat;
import java.util.Date;

import javax.portlet.PortletRequest;

import qldc.pm.tiensu.constants.TienSuConstants;

import com.liferay.portal.kernel.dao.search.DisplayTerms;
import com.liferay.portal.kernel.util.ParamUtil;

public class DSHoGiaDinhDisplayTerms extends DisplayTerms {
	public static final String TINH_ID = "noiThuongTruTinhId";
	public static final String QUAN_HUYEN_ID = "noiThuongTruQuanHuyenId";
	public static final String PHUONG_XA_ID = "noiThuongTruPhuongXaId";

	public static final String TU_NGAY_TOA_AN = "tuNgayToaAn";
	public static final String DEN_NGAY_TOA_AN = "denNgayToaAn";
	
	protected Date tuNgayToaAn;
	protected Date denNgayToaAn;
	protected long tinhId;
	protected long quanHuyenId;
	protected long phuongXaId;


	public DSHoGiaDinhDisplayTerms(PortletRequest portletRequest) {
		super(portletRequest);

		SimpleDateFormat dateFormat = new SimpleDateFormat(TienSuConstants.DATE_PATTERN);
	
		tuNgayToaAn = ParamUtil.getDate(portletRequest, TU_NGAY_TOA_AN, dateFormat,
				null);
		denNgayToaAn = ParamUtil.getDate(portletRequest, DEN_NGAY_TOA_AN,
				dateFormat, null);
		quanHuyenId = ParamUtil.getLong(portletRequest, QUAN_HUYEN_ID);
		phuongXaId = ParamUtil.getLong(portletRequest, PHUONG_XA_ID);
		tinhId = ParamUtil.getLong(portletRequest, TINH_ID);
		
	}



	public Date getTuNgayToaAn() {
		return tuNgayToaAn;
	}

	public void setTuNgayToaAn(Date tuNgayToaAn) {
		this.tuNgayToaAn = tuNgayToaAn;
	}

	public Date getDenNgayToaAn() {
		return denNgayToaAn;
	}

	public void setDenNgayToaAn(Date denNgayToaAn) {
		this.denNgayToaAn = denNgayToaAn;
	}


	public long getQuanHuyenId() {
		return quanHuyenId;
	}

	public void setQuanHuyenId(long quanHuyenId) {
		this.quanHuyenId = quanHuyenId;
	}

	public long getPhuongXaId() {
		return phuongXaId;
	}

	public void setPhuongXaId(long phuongXaId) {
		this.phuongXaId = phuongXaId;
	}


	public long getTinhId() {
		return tinhId;
	}

	public void setTinhId(long tinhId) {
		this.tinhId = tinhId;
	}


}
